# QueryInst

Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15908;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15909;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15910;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15911;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15941) END FROM WidgetInst WHERE WidgetInstId = 15941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15942) END FROM WidgetInst WHERE WidgetInstId = 15942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15949;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15943) END FROM WidgetInst WHERE WidgetInstId = 15943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15950;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15944) END FROM WidgetInst WHERE WidgetInstId = 15944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15951;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15945) END FROM WidgetInst WHERE WidgetInstId = 15945) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15946) END FROM WidgetInst WHERE WidgetInstId = 15946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 15947) END FROM WidgetInst WHERE WidgetInstId = 15947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15954;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15941) END FROM WidgetInst WHERE WidgetInstId = 15941) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15969;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15942) END FROM WidgetInst WHERE WidgetInstId = 15942) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15943) END FROM WidgetInst WHERE WidgetInstId = 15943) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15944) END FROM WidgetInst WHERE WidgetInstId = 15944) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15945) END FROM WidgetInst WHERE WidgetInstId = 15945) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15946) END FROM WidgetInst WHERE WidgetInstId = 15946) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 15947) END FROM WidgetInst WHERE WidgetInstId = 15947) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15992;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15993;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15994;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15995;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 15996;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16004) END FROM WidgetInst WHERE WidgetInstId = 16004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16005) END FROM WidgetInst WHERE WidgetInstId = 16005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16006) END FROM WidgetInst WHERE WidgetInstId = 16006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16007) END FROM WidgetInst WHERE WidgetInstId = 16007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16008) END FROM WidgetInst WHERE WidgetInstId = 16008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16009) END FROM WidgetInst WHERE WidgetInstId = 16009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16010) END FROM WidgetInst WHERE WidgetInstId = 16010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16004) END FROM WidgetInst WHERE WidgetInstId = 16004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16005) END FROM WidgetInst WHERE WidgetInstId = 16005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16006) END FROM WidgetInst WHERE WidgetInstId = 16006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16007) END FROM WidgetInst WHERE WidgetInstId = 16007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16008) END FROM WidgetInst WHERE WidgetInstId = 16008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16009) END FROM WidgetInst WHERE WidgetInstId = 16009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16010) END FROM WidgetInst WHERE WidgetInstId = 16010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16004) END FROM WidgetInst WHERE WidgetInstId = 16004) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16005) END FROM WidgetInst WHERE WidgetInstId = 16005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16006) END FROM WidgetInst WHERE WidgetInstId = 16006) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16007) END FROM WidgetInst WHERE WidgetInstId = 16007) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16008) END FROM WidgetInst WHERE WidgetInstId = 16008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16009) END FROM WidgetInst WHERE WidgetInstId = 16009) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16010) END FROM WidgetInst WHERE WidgetInstId = 16010) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16074;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16088) END FROM WidgetInst WHERE WidgetInstId = 16088)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16109;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16090) END FROM WidgetInst WHERE WidgetInstId = 16090)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16091) END FROM WidgetInst WHERE WidgetInstId = 16091)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16112;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16092) END FROM WidgetInst WHERE WidgetInstId = 16092)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16113;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16093) END FROM WidgetInst WHERE WidgetInstId = 16093)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 16094) END FROM WidgetInst WHERE WidgetInstId = 16094)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16115;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16130;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16131;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16132;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16133;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16136;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16137;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16160;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16161;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16163;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16164;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16088) END FROM WidgetInst WHERE WidgetInstId = 16088)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16089) END FROM WidgetInst WHERE WidgetInstId = 16089)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16090) END FROM WidgetInst WHERE WidgetInstId = 16090)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16091) END FROM WidgetInst WHERE WidgetInstId = 16091)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16092) END FROM WidgetInst WHERE WidgetInstId = 16092)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16093) END FROM WidgetInst WHERE WidgetInstId = 16093)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16094) END FROM WidgetInst WHERE WidgetInstId = 16094)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16196;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16199;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16214) END FROM WidgetInst WHERE WidgetInstId = 16214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16215) END FROM WidgetInst WHERE WidgetInstId = 16215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16216) END FROM WidgetInst WHERE WidgetInstId = 16216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16217) END FROM WidgetInst WHERE WidgetInstId = 16217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16218) END FROM WidgetInst WHERE WidgetInstId = 16218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16219) END FROM WidgetInst WHERE WidgetInstId = 16219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 16220) END FROM WidgetInst WHERE WidgetInstId = 16220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16235;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16236;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16237;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16238;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16239;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16240;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16241;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16242;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16214) END FROM WidgetInst WHERE WidgetInstId = 16214) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16215) END FROM WidgetInst WHERE WidgetInstId = 16215) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16216) END FROM WidgetInst WHERE WidgetInstId = 16216) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16217) END FROM WidgetInst WHERE WidgetInstId = 16217) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16218) END FROM WidgetInst WHERE WidgetInstId = 16218) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16219) END FROM WidgetInst WHERE WidgetInstId = 16219) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 16220) END FROM WidgetInst WHERE WidgetInstId = 16220) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16263;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16102) END FROM WidgetInst WHERE WidgetInstId = 16102) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16103) END FROM WidgetInst WHERE WidgetInstId = 16103) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16104) END FROM WidgetInst WHERE WidgetInstId = 16104) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16272;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16105) END FROM WidgetInst WHERE WidgetInstId = 16105) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16106) END FROM WidgetInst WHERE WidgetInstId = 16106) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16274;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16107) END FROM WidgetInst WHERE WidgetInstId = 16107) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 16108) END FROM WidgetInst WHERE WidgetInstId = 16108) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16276;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16300;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16301;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16304;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16529) END FROM WidgetInst WHERE WidgetInstId = 16529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16530) END FROM WidgetInst WHERE WidgetInstId = 16530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16537;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16531) END FROM WidgetInst WHERE WidgetInstId = 16531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16532) END FROM WidgetInst WHERE WidgetInstId = 16532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16533) END FROM WidgetInst WHERE WidgetInstId = 16533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16540;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16534) END FROM WidgetInst WHERE WidgetInstId = 16534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16541;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16535) END FROM WidgetInst WHERE WidgetInstId = 16535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16542;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16529) END FROM WidgetInst WHERE WidgetInstId = 16529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16530) END FROM WidgetInst WHERE WidgetInstId = 16530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16531) END FROM WidgetInst WHERE WidgetInstId = 16531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16532) END FROM WidgetInst WHERE WidgetInstId = 16532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16533) END FROM WidgetInst WHERE WidgetInstId = 16533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16534) END FROM WidgetInst WHERE WidgetInstId = 16534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16535) END FROM WidgetInst WHERE WidgetInstId = 16535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16529) END FROM WidgetInst WHERE WidgetInstId = 16529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16530) END FROM WidgetInst WHERE WidgetInstId = 16530) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16565;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16531) END FROM WidgetInst WHERE WidgetInstId = 16531) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16532) END FROM WidgetInst WHERE WidgetInstId = 16532) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16533) END FROM WidgetInst WHERE WidgetInstId = 16533) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16568;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16534) END FROM WidgetInst WHERE WidgetInstId = 16534) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16569;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16535) END FROM WidgetInst WHERE WidgetInstId = 16535) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16570;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16579;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16641) END FROM WidgetInst WHERE WidgetInstId = 16641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16648;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16642) END FROM WidgetInst WHERE WidgetInstId = 16642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16649;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16643) END FROM WidgetInst WHERE WidgetInstId = 16643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16650;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16644) END FROM WidgetInst WHERE WidgetInstId = 16644) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16651;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16645) END FROM WidgetInst WHERE WidgetInstId = 16645) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16652;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16646) END FROM WidgetInst WHERE WidgetInstId = 16646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16653;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16647) END FROM WidgetInst WHERE WidgetInstId = 16647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16654;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16641) END FROM WidgetInst WHERE WidgetInstId = 16641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16642) END FROM WidgetInst WHERE WidgetInstId = 16642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16663;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16643) END FROM WidgetInst WHERE WidgetInstId = 16643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16664;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16644) END FROM WidgetInst WHERE WidgetInstId = 16644) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16665;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16645) END FROM WidgetInst WHERE WidgetInstId = 16645) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16666;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16646) END FROM WidgetInst WHERE WidgetInstId = 16646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16667;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16647) END FROM WidgetInst WHERE WidgetInstId = 16647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16668;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16641) END FROM WidgetInst WHERE WidgetInstId = 16641) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16642) END FROM WidgetInst WHERE WidgetInstId = 16642) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16643) END FROM WidgetInst WHERE WidgetInstId = 16643) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16644) END FROM WidgetInst WHERE WidgetInstId = 16644) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16645) END FROM WidgetInst WHERE WidgetInstId = 16645) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16646) END FROM WidgetInst WHERE WidgetInstId = 16646) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16647) END FROM WidgetInst WHERE WidgetInstId = 16647) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16690;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16691;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16694;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16695;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16781) END FROM WidgetInst WHERE WidgetInstId = 16781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16788;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16782) END FROM WidgetInst WHERE WidgetInstId = 16782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16789;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16783) END FROM WidgetInst WHERE WidgetInstId = 16783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16790;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16784) END FROM WidgetInst WHERE WidgetInstId = 16784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16791;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16785) END FROM WidgetInst WHERE WidgetInstId = 16785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16792;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16786) END FROM WidgetInst WHERE WidgetInstId = 16786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16793;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16787) END FROM WidgetInst WHERE WidgetInstId = 16787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16794;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16781) END FROM WidgetInst WHERE WidgetInstId = 16781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16782) END FROM WidgetInst WHERE WidgetInstId = 16782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16783) END FROM WidgetInst WHERE WidgetInstId = 16783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16784) END FROM WidgetInst WHERE WidgetInstId = 16784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16785) END FROM WidgetInst WHERE WidgetInstId = 16785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16786) END FROM WidgetInst WHERE WidgetInstId = 16786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16787) END FROM WidgetInst WHERE WidgetInstId = 16787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16781) END FROM WidgetInst WHERE WidgetInstId = 16781) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16782) END FROM WidgetInst WHERE WidgetInstId = 16782) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16783) END FROM WidgetInst WHERE WidgetInstId = 16783) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16818;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16784) END FROM WidgetInst WHERE WidgetInstId = 16784) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16819;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16785) END FROM WidgetInst WHERE WidgetInstId = 16785) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16786) END FROM WidgetInst WHERE WidgetInstId = 16786) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16787) END FROM WidgetInst WHERE WidgetInstId = 16787) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16822;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16832;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16833;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16834;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16835;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16921) END FROM WidgetInst WHERE WidgetInstId = 16921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16929;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16923) END FROM WidgetInst WHERE WidgetInstId = 16923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16924) END FROM WidgetInst WHERE WidgetInstId = 16924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16925) END FROM WidgetInst WHERE WidgetInstId = 16925) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16932;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16926) END FROM WidgetInst WHERE WidgetInstId = 16926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16933;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16927) END FROM WidgetInst WHERE WidgetInstId = 16927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16921) END FROM WidgetInst WHERE WidgetInstId = 16921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16923) END FROM WidgetInst WHERE WidgetInstId = 16923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16944;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16924) END FROM WidgetInst WHERE WidgetInstId = 16924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16945;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16925) END FROM WidgetInst WHERE WidgetInstId = 16925) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16926) END FROM WidgetInst WHERE WidgetInstId = 16926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16927) END FROM WidgetInst WHERE WidgetInstId = 16927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16948;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16921) END FROM WidgetInst WHERE WidgetInstId = 16921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16956;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16923) END FROM WidgetInst WHERE WidgetInstId = 16923) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16924) END FROM WidgetInst WHERE WidgetInstId = 16924) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16925) END FROM WidgetInst WHERE WidgetInstId = 16925) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16926) END FROM WidgetInst WHERE WidgetInstId = 16926) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16927) END FROM WidgetInst WHERE WidgetInstId = 16927) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16963) END FROM WidgetInst WHERE WidgetInstId = 16963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16921) END FROM WidgetInst WHERE WidgetInstId = 16921)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16970;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16964) END FROM WidgetInst WHERE WidgetInstId = 16964) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16965) END FROM WidgetInst WHERE WidgetInstId = 16965) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16923) END FROM WidgetInst WHERE WidgetInstId = 16923)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16966) END FROM WidgetInst WHERE WidgetInstId = 16966) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16924) END FROM WidgetInst WHERE WidgetInstId = 16924)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16967) END FROM WidgetInst WHERE WidgetInstId = 16967) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16925) END FROM WidgetInst WHERE WidgetInstId = 16925)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16968) END FROM WidgetInst WHERE WidgetInstId = 16968) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16926) END FROM WidgetInst WHERE WidgetInstId = 16926)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16969) END FROM WidgetInst WHERE WidgetInstId = 16969) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16927) END FROM WidgetInst WHERE WidgetInstId = 16927)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16963) END FROM WidgetInst WHERE WidgetInstId = 16963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16921) END FROM WidgetInst WHERE WidgetInstId = 16921)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16984;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16964) END FROM WidgetInst WHERE WidgetInstId = 16964) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16965) END FROM WidgetInst WHERE WidgetInstId = 16965) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16923) END FROM WidgetInst WHERE WidgetInstId = 16923)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16966) END FROM WidgetInst WHERE WidgetInstId = 16966) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16924) END FROM WidgetInst WHERE WidgetInstId = 16924)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16967) END FROM WidgetInst WHERE WidgetInstId = 16967) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16925) END FROM WidgetInst WHERE WidgetInstId = 16925)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16968) END FROM WidgetInst WHERE WidgetInstId = 16968) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16926) END FROM WidgetInst WHERE WidgetInstId = 16926)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16969) END FROM WidgetInst WHERE WidgetInstId = 16969) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16927) END FROM WidgetInst WHERE WidgetInstId = 16927)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16963) END FROM WidgetInst WHERE WidgetInstId = 16963) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16921) END FROM WidgetInst WHERE WidgetInstId = 16921)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16998;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16964) END FROM WidgetInst WHERE WidgetInstId = 16964) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16922) END FROM WidgetInst WHERE WidgetInstId = 16922)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 16999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16965) END FROM WidgetInst WHERE WidgetInstId = 16965) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16923) END FROM WidgetInst WHERE WidgetInstId = 16923)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16966) END FROM WidgetInst WHERE WidgetInstId = 16966) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16924) END FROM WidgetInst WHERE WidgetInstId = 16924)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16967) END FROM WidgetInst WHERE WidgetInstId = 16967) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16925) END FROM WidgetInst WHERE WidgetInstId = 16925)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16968) END FROM WidgetInst WHERE WidgetInstId = 16968) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16926) END FROM WidgetInst WHERE WidgetInstId = 16926)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 16969) END FROM WidgetInst WHERE WidgetInstId = 16969) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 16927) END FROM WidgetInst WHERE WidgetInstId = 16927)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17012;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17026) END FROM WidgetInst WHERE WidgetInstId = 17026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17027) END FROM WidgetInst WHERE WidgetInstId = 17027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17034;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17028) END FROM WidgetInst WHERE WidgetInstId = 17028) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17029) END FROM WidgetInst WHERE WidgetInstId = 17029) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17036;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17030) END FROM WidgetInst WHERE WidgetInstId = 17030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17031) END FROM WidgetInst WHERE WidgetInstId = 17031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17038;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17032) END FROM WidgetInst WHERE WidgetInstId = 17032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17026) END FROM WidgetInst WHERE WidgetInstId = 17026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17054;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17027) END FROM WidgetInst WHERE WidgetInstId = 17027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17028) END FROM WidgetInst WHERE WidgetInstId = 17028) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17056;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17029) END FROM WidgetInst WHERE WidgetInstId = 17029) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17030) END FROM WidgetInst WHERE WidgetInstId = 17030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17058;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17031) END FROM WidgetInst WHERE WidgetInstId = 17031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17032) END FROM WidgetInst WHERE WidgetInstId = 17032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17060;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17026) END FROM WidgetInst WHERE WidgetInstId = 17026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17027) END FROM WidgetInst WHERE WidgetInstId = 17027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17076;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17028) END FROM WidgetInst WHERE WidgetInstId = 17028) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17029) END FROM WidgetInst WHERE WidgetInstId = 17029) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17078;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17030) END FROM WidgetInst WHERE WidgetInstId = 17030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17031) END FROM WidgetInst WHERE WidgetInstId = 17031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17080;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17032) END FROM WidgetInst WHERE WidgetInstId = 17032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17026) END FROM WidgetInst WHERE WidgetInstId = 17026) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17027) END FROM WidgetInst WHERE WidgetInstId = 17027) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17028) END FROM WidgetInst WHERE WidgetInstId = 17028) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17029) END FROM WidgetInst WHERE WidgetInstId = 17029) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17030) END FROM WidgetInst WHERE WidgetInstId = 17030) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17031) END FROM WidgetInst WHERE WidgetInstId = 17031) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17032) END FROM WidgetInst WHERE WidgetInstId = 17032) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17173;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17178;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17179;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17194) END FROM WidgetInst WHERE WidgetInstId = 17194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17195) END FROM WidgetInst WHERE WidgetInstId = 17195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17196) END FROM WidgetInst WHERE WidgetInstId = 17196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17197) END FROM WidgetInst WHERE WidgetInstId = 17197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17198) END FROM WidgetInst WHERE WidgetInstId = 17198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17199) END FROM WidgetInst WHERE WidgetInstId = 17199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17200) END FROM WidgetInst WHERE WidgetInstId = 17200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17194) END FROM WidgetInst WHERE WidgetInstId = 17194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17195) END FROM WidgetInst WHERE WidgetInstId = 17195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17196) END FROM WidgetInst WHERE WidgetInstId = 17196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17224;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17197) END FROM WidgetInst WHERE WidgetInstId = 17197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17225;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17198) END FROM WidgetInst WHERE WidgetInstId = 17198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17226;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17199) END FROM WidgetInst WHERE WidgetInstId = 17199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17227;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17200) END FROM WidgetInst WHERE WidgetInstId = 17200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17228;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17194) END FROM WidgetInst WHERE WidgetInstId = 17194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17243;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17195) END FROM WidgetInst WHERE WidgetInstId = 17195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17244;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17196) END FROM WidgetInst WHERE WidgetInstId = 17196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17245;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17197) END FROM WidgetInst WHERE WidgetInstId = 17197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17246;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17198) END FROM WidgetInst WHERE WidgetInstId = 17198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17247;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17199) END FROM WidgetInst WHERE WidgetInstId = 17199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17248;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17200) END FROM WidgetInst WHERE WidgetInstId = 17200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17249;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17194) END FROM WidgetInst WHERE WidgetInstId = 17194) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17320;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17195) END FROM WidgetInst WHERE WidgetInstId = 17195) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17196) END FROM WidgetInst WHERE WidgetInstId = 17196) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17197) END FROM WidgetInst WHERE WidgetInstId = 17197) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17198) END FROM WidgetInst WHERE WidgetInstId = 17198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17324;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17199) END FROM WidgetInst WHERE WidgetInstId = 17199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17325;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17200) END FROM WidgetInst WHERE WidgetInstId = 17200) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17348) END FROM WidgetInst WHERE WidgetInstId = 17348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17355;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17349) END FROM WidgetInst WHERE WidgetInstId = 17349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17350) END FROM WidgetInst WHERE WidgetInstId = 17350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17357;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17351) END FROM WidgetInst WHERE WidgetInstId = 17351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17358;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17352) END FROM WidgetInst WHERE WidgetInstId = 17352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17359;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17353) END FROM WidgetInst WHERE WidgetInstId = 17353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17360;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17361;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17348) END FROM WidgetInst WHERE WidgetInstId = 17348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17369;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17349) END FROM WidgetInst WHERE WidgetInstId = 17349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17350) END FROM WidgetInst WHERE WidgetInstId = 17350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17351) END FROM WidgetInst WHERE WidgetInstId = 17351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17352) END FROM WidgetInst WHERE WidgetInstId = 17352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17373;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17353) END FROM WidgetInst WHERE WidgetInstId = 17353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17348) END FROM WidgetInst WHERE WidgetInstId = 17348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17383;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17349) END FROM WidgetInst WHERE WidgetInstId = 17349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17350) END FROM WidgetInst WHERE WidgetInstId = 17350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17385;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17351) END FROM WidgetInst WHERE WidgetInstId = 17351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17386;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17352) END FROM WidgetInst WHERE WidgetInstId = 17352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17387;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17353) END FROM WidgetInst WHERE WidgetInstId = 17353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17388;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17389;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17348) END FROM WidgetInst WHERE WidgetInstId = 17348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17397;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17349) END FROM WidgetInst WHERE WidgetInstId = 17349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17398;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17350) END FROM WidgetInst WHERE WidgetInstId = 17350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17399;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17351) END FROM WidgetInst WHERE WidgetInstId = 17351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17400;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17352) END FROM WidgetInst WHERE WidgetInstId = 17352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17401;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17353) END FROM WidgetInst WHERE WidgetInstId = 17353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17348) END FROM WidgetInst WHERE WidgetInstId = 17348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17349) END FROM WidgetInst WHERE WidgetInstId = 17349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17350) END FROM WidgetInst WHERE WidgetInstId = 17350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17351) END FROM WidgetInst WHERE WidgetInstId = 17351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17352) END FROM WidgetInst WHERE WidgetInstId = 17352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17353) END FROM WidgetInst WHERE WidgetInstId = 17353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17417;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17348) END FROM WidgetInst WHERE WidgetInstId = 17348) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17425;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17349) END FROM WidgetInst WHERE WidgetInstId = 17349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17350) END FROM WidgetInst WHERE WidgetInstId = 17350) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17351) END FROM WidgetInst WHERE WidgetInstId = 17351) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17428;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17352) END FROM WidgetInst WHERE WidgetInstId = 17352) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17429;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17353) END FROM WidgetInst WHERE WidgetInstId = 17353) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17430;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17354) END FROM WidgetInst WHERE WidgetInstId = 17354) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15801) END FROM WidgetInst WHERE WidgetInstId = 15801) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15802) END FROM WidgetInst WHERE WidgetInstId = 15802) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17440;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15803) END FROM WidgetInst WHERE WidgetInstId = 15803) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17441;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15804) END FROM WidgetInst WHERE WidgetInstId = 15804) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17442;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15805) END FROM WidgetInst WHERE WidgetInstId = 15805) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17443;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15806) END FROM WidgetInst WHERE WidgetInstId = 15806) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 15807) END FROM WidgetInst WHERE WidgetInstId = 15807) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17453) END FROM WidgetInst WHERE WidgetInstId = 17453) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17460;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17454) END FROM WidgetInst WHERE WidgetInstId = 17454) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17461;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17455) END FROM WidgetInst WHERE WidgetInstId = 17455) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17462;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17456) END FROM WidgetInst WHERE WidgetInstId = 17456) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17463;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17457) END FROM WidgetInst WHERE WidgetInstId = 17457) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17464;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17458) END FROM WidgetInst WHERE WidgetInstId = 17458) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17465;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17459) END FROM WidgetInst WHERE WidgetInstId = 17459) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17466;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 17478;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 17478;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 17478;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 17478;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 17478;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 17478;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 17479;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 17479;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 17479;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 17479;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 17479;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 17479;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17480;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17481;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 17484) END FROM WidgetInst WHERE WidgetInstId = 17484) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17486;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 17485) END FROM WidgetInst WHERE WidgetInstId = 17485) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17502;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17503;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 15403) END FROM WidgetInst WHERE WidgetInstId = 15403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17515;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17518) END FROM WidgetInst WHERE WidgetInstId = 17518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17520;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17519) END FROM WidgetInst WHERE WidgetInstId = 17519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17521;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17518) END FROM WidgetInst WHERE WidgetInstId = 17518) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17526;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17519) END FROM WidgetInst WHERE WidgetInstId = 17519) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17527;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17536) END FROM WidgetInst WHERE WidgetInstId = 17536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17538;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17537) END FROM WidgetInst WHERE WidgetInstId = 17537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17539;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17536) END FROM WidgetInst WHERE WidgetInstId = 17536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17537) END FROM WidgetInst WHERE WidgetInstId = 17537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17536) END FROM WidgetInst WHERE WidgetInstId = 17536) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17537) END FROM WidgetInst WHERE WidgetInstId = 17537) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17557;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17560) END FROM WidgetInst WHERE WidgetInstId = 17560)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17566;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17561) END FROM WidgetInst WHERE WidgetInstId = 17561)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17567;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17580;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17581;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17582;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17583;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17560) END FROM WidgetInst WHERE WidgetInstId = 17560)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17584;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17561) END FROM WidgetInst WHERE WidgetInstId = 17561)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17585;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17597) END FROM WidgetInst WHERE WidgetInstId = 17597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17599;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17596) END FROM WidgetInst WHERE WidgetInstId = 17596) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 17597) END FROM WidgetInst WHERE WidgetInstId = 17597) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17607;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17610;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17611;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17564) END FROM WidgetInst WHERE WidgetInstId = 17564) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17612;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 17565) END FROM WidgetInst WHERE WidgetInstId = 17565) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17621;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17686) END FROM WidgetInst WHERE WidgetInstId = 17686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17688;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17687) END FROM WidgetInst WHERE WidgetInstId = 17687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17689;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17686) END FROM WidgetInst WHERE WidgetInstId = 17686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17692;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17687) END FROM WidgetInst WHERE WidgetInstId = 17687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17693;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17686) END FROM WidgetInst WHERE WidgetInstId = 17686) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17696;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17687) END FROM WidgetInst WHERE WidgetInstId = 17687) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17697;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17700;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17701;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17718) END FROM WidgetInst WHERE WidgetInstId = 17718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17720;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17719) END FROM WidgetInst WHERE WidgetInstId = 17719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17721;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17718) END FROM WidgetInst WHERE WidgetInstId = 17718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17724;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17719) END FROM WidgetInst WHERE WidgetInstId = 17719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17725;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17718) END FROM WidgetInst WHERE WidgetInstId = 17718) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17728;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17719) END FROM WidgetInst WHERE WidgetInstId = 17719) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17729;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17758) END FROM WidgetInst WHERE WidgetInstId = 17758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17759) END FROM WidgetInst WHERE WidgetInstId = 17759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17758) END FROM WidgetInst WHERE WidgetInstId = 17758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17759) END FROM WidgetInst WHERE WidgetInstId = 17759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17758) END FROM WidgetInst WHERE WidgetInstId = 17758) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17759) END FROM WidgetInst WHERE WidgetInstId = 17759) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17798) END FROM WidgetInst WHERE WidgetInstId = 17798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17799) END FROM WidgetInst WHERE WidgetInstId = 17799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17798) END FROM WidgetInst WHERE WidgetInstId = 17798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17799) END FROM WidgetInst WHERE WidgetInstId = 17799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17798) END FROM WidgetInst WHERE WidgetInstId = 17798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17799) END FROM WidgetInst WHERE WidgetInstId = 17799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17810) END FROM WidgetInst WHERE WidgetInstId = 17810) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17798) END FROM WidgetInst WHERE WidgetInstId = 17798)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17812;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17799) END FROM WidgetInst WHERE WidgetInstId = 17799)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17813;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17810) END FROM WidgetInst WHERE WidgetInstId = 17810) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17798) END FROM WidgetInst WHERE WidgetInstId = 17798)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17816;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17799) END FROM WidgetInst WHERE WidgetInstId = 17799)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17817;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17810) END FROM WidgetInst WHERE WidgetInstId = 17810) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17798) END FROM WidgetInst WHERE WidgetInstId = 17798)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17820;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 17811) END FROM WidgetInst WHERE WidgetInstId = 17811) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 17799) END FROM WidgetInst WHERE WidgetInstId = 17799)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17821;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17828) END FROM WidgetInst WHERE WidgetInstId = 17828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17829) END FROM WidgetInst WHERE WidgetInstId = 17829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17831;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17828) END FROM WidgetInst WHERE WidgetInstId = 17828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17836;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17829) END FROM WidgetInst WHERE WidgetInstId = 17829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17828) END FROM WidgetInst WHERE WidgetInstId = 17828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17829) END FROM WidgetInst WHERE WidgetInstId = 17829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17828) END FROM WidgetInst WHERE WidgetInstId = 17828) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17864;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17829) END FROM WidgetInst WHERE WidgetInstId = 17829) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 17877) END FROM WidgetInst WHERE WidgetInstId = 17877) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 17877) END FROM WidgetInst WHERE WidgetInstId = 17877) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17890;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 17877) END FROM WidgetInst WHERE WidgetInstId = 17877) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17891;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17876) END FROM WidgetInst WHERE WidgetInstId = 17876) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17912;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 17877) END FROM WidgetInst WHERE WidgetInstId = 17877) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17913;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17920) END FROM WidgetInst WHERE WidgetInstId = 17920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 17921) END FROM WidgetInst WHERE WidgetInstId = 17921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17920) END FROM WidgetInst WHERE WidgetInstId = 17920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17921) END FROM WidgetInst WHERE WidgetInstId = 17921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17920) END FROM WidgetInst WHERE WidgetInstId = 17920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17930;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17921) END FROM WidgetInst WHERE WidgetInstId = 17921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17931;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17920) END FROM WidgetInst WHERE WidgetInstId = 17920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17934;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17921) END FROM WidgetInst WHERE WidgetInstId = 17921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17935;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17920) END FROM WidgetInst WHERE WidgetInstId = 17920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17938;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17921) END FROM WidgetInst WHERE WidgetInstId = 17921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17939;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17920) END FROM WidgetInst WHERE WidgetInstId = 17920) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17942;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 17921) END FROM WidgetInst WHERE WidgetInstId = 17921) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17943;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17478) END FROM WidgetInst WHERE WidgetInstId = 17478) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17946;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 17479) END FROM WidgetInst WHERE WidgetInstId = 17479) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 15406) END FROM WidgetInst WHERE WidgetInstId = 15406)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17947;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17950) END FROM WidgetInst WHERE WidgetInstId = 17950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17952;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 17951) END FROM WidgetInst WHERE WidgetInstId = 17951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 17953;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Flow' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18009;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18011;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mixed' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18025;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Parker' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18035;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18037;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18039;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18049;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18051;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wilcock-Crowe' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18053;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18055;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18057;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wu-et-al' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18059;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18061;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18021) END FROM WidgetInst WHERE WidgetInstId = 18021) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Meyer-Peter-Muller' AND WidgetInstId = 18023) END FROM WidgetInst WHERE WidgetInstId = 18023) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18069;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Trinity' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18071;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Aw' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18073;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rijn' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18075;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18077;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Seminara' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18079;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18085;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'User defined' AND WidgetInstId = 18016) END FROM WidgetInst WHERE WidgetInstId = 18016) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18087;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant Length' AND WidgetInstId = 18100) END FROM WidgetInst WHERE WidgetInstId = 18100) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18101;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18110) END FROM WidgetInst WHERE WidgetInstId = 18110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 18113) END FROM WidgetInst WHERE WidgetInstId = 18113) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18114;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Data File' AND WidgetInstId = 18118) END FROM WidgetInst WHERE WidgetInstId = 18118) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18119;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Input Parameters' AND WidgetInstId = 18118) END FROM WidgetInst WHERE WidgetInstId = 18118) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18121;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18110) END FROM WidgetInst WHERE WidgetInstId = 18110) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18136;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18150;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18150;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18150;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18150;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18150;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18150;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18151;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18153) END FROM WidgetInst WHERE WidgetInstId = 18153) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18162;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 32) END FROM WidgetInst WHERE WidgetInstId = 32) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18165;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18170) END FROM WidgetInst WHERE WidgetInstId = 18170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18170) END FROM WidgetInst WHERE WidgetInstId = 18170) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18179) END FROM WidgetInst WHERE WidgetInstId = 18179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18179) END FROM WidgetInst WHERE WidgetInstId = 18179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18179) END FROM WidgetInst WHERE WidgetInstId = 18179) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18189;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18191) END FROM WidgetInst WHERE WidgetInstId = 18191)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18197;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18198;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18202;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18191) END FROM WidgetInst WHERE WidgetInstId = 18191)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18203;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18209) END FROM WidgetInst WHERE WidgetInstId = 18209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18210;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18209) END FROM WidgetInst WHERE WidgetInstId = 18209) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18193) END FROM WidgetInst WHERE WidgetInstId = 18193) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18218;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18221;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18254) END FROM WidgetInst WHERE WidgetInstId = 18254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18254) END FROM WidgetInst WHERE WidgetInstId = 18254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18257;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18254) END FROM WidgetInst WHERE WidgetInstId = 18254) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18259;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18261;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18271;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18273;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18270) END FROM WidgetInst WHERE WidgetInstId = 18270) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18275;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18277;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18290) END FROM WidgetInst WHERE WidgetInstId = 18290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18290) END FROM WidgetInst WHERE WidgetInstId = 18290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18290) END FROM WidgetInst WHERE WidgetInstId = 18290) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18310) END FROM WidgetInst WHERE WidgetInstId = 18310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18311;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18310) END FROM WidgetInst WHERE WidgetInstId = 18310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18313;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18310) END FROM WidgetInst WHERE WidgetInstId = 18310) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18315;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18316) END FROM WidgetInst WHERE WidgetInstId = 18316) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18310) END FROM WidgetInst WHERE WidgetInstId = 18310)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18317;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18316) END FROM WidgetInst WHERE WidgetInstId = 18316) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18310) END FROM WidgetInst WHERE WidgetInstId = 18310)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18319;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 18316) END FROM WidgetInst WHERE WidgetInstId = 18316) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 18310) END FROM WidgetInst WHERE WidgetInstId = 18310)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18321;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18325) END FROM WidgetInst WHERE WidgetInstId = 18325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18325) END FROM WidgetInst WHERE WidgetInstId = 18325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18329;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18325) END FROM WidgetInst WHERE WidgetInstId = 18325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18332;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18325) END FROM WidgetInst WHERE WidgetInstId = 18325) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18343;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18150) END FROM WidgetInst WHERE WidgetInstId = 18150) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18346;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18349) END FROM WidgetInst WHERE WidgetInstId = 18349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18350;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18349) END FROM WidgetInst WHERE WidgetInstId = 18349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18353;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18349) END FROM WidgetInst WHERE WidgetInstId = 18349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18356;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 18349) END FROM WidgetInst WHERE WidgetInstId = 18349) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 18371) END FROM WidgetInst WHERE WidgetInstId = 18371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18372;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18371) END FROM WidgetInst WHERE WidgetInstId = 18371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18371) END FROM WidgetInst WHERE WidgetInstId = 18371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18376;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18371) END FROM WidgetInst WHERE WidgetInstId = 18371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18378;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18371) END FROM WidgetInst WHERE WidgetInstId = 18371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18380;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 18371) END FROM WidgetInst WHERE WidgetInstId = 18371) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18382;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 177) END FROM WidgetInst WHERE WidgetInstId = 177) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 35) END FROM WidgetInst WHERE WidgetInstId = 35)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18384;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 18386) END FROM WidgetInst WHERE WidgetInstId = 18386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18387;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18403;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18403;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18403;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18403;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18403;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18403;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18404;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18404;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18404;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18404;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18404;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18404;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18405;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18405;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18405;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18405;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18405;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18405;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18406;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18407;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18408;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18408;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18408;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18408;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18408;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18408;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 18409;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 18409;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 18409;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 18409;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 18409;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 18409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18412;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18413;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18416;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18424) END FROM WidgetInst WHERE WidgetInstId = 18424) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18431;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18425) END FROM WidgetInst WHERE WidgetInstId = 18425) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18426) END FROM WidgetInst WHERE WidgetInstId = 18426) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18427) END FROM WidgetInst WHERE WidgetInstId = 18427) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18428) END FROM WidgetInst WHERE WidgetInstId = 18428) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18429) END FROM WidgetInst WHERE WidgetInstId = 18429) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 18430) END FROM WidgetInst WHERE WidgetInstId = 18430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18445;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18446;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18447;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18448;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18449;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18450;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18451;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18487;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18488;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18489;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18490;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18491;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18492;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18493;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18508;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18509;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18510;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18511;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18512;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18513;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18514;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18529;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18543) END FROM WidgetInst WHERE WidgetInstId = 18543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18544) END FROM WidgetInst WHERE WidgetInstId = 18544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18551;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18545) END FROM WidgetInst WHERE WidgetInstId = 18545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18552;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18546) END FROM WidgetInst WHERE WidgetInstId = 18546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18553;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18547) END FROM WidgetInst WHERE WidgetInstId = 18547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18554;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18548) END FROM WidgetInst WHERE WidgetInstId = 18548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18555;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18549) END FROM WidgetInst WHERE WidgetInstId = 18549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18556;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18543) END FROM WidgetInst WHERE WidgetInstId = 18543) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18571;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18544) END FROM WidgetInst WHERE WidgetInstId = 18544) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18545) END FROM WidgetInst WHERE WidgetInstId = 18545) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18546) END FROM WidgetInst WHERE WidgetInstId = 18546) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18547) END FROM WidgetInst WHERE WidgetInstId = 18547) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18548) END FROM WidgetInst WHERE WidgetInstId = 18548) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18549) END FROM WidgetInst WHERE WidgetInstId = 18549) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18593;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18594;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18595;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18596;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18597;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18598;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18606) END FROM WidgetInst WHERE WidgetInstId = 18606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18613;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18607) END FROM WidgetInst WHERE WidgetInstId = 18607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18608) END FROM WidgetInst WHERE WidgetInstId = 18608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18609) END FROM WidgetInst WHERE WidgetInstId = 18609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18610) END FROM WidgetInst WHERE WidgetInstId = 18610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18611) END FROM WidgetInst WHERE WidgetInstId = 18611) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18612) END FROM WidgetInst WHERE WidgetInstId = 18612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18606) END FROM WidgetInst WHERE WidgetInstId = 18606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18634;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18607) END FROM WidgetInst WHERE WidgetInstId = 18607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18608) END FROM WidgetInst WHERE WidgetInstId = 18608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18609) END FROM WidgetInst WHERE WidgetInstId = 18609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18610) END FROM WidgetInst WHERE WidgetInstId = 18610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18611) END FROM WidgetInst WHERE WidgetInstId = 18611) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18612) END FROM WidgetInst WHERE WidgetInstId = 18612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18606) END FROM WidgetInst WHERE WidgetInstId = 18606) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18655;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18607) END FROM WidgetInst WHERE WidgetInstId = 18607) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18608) END FROM WidgetInst WHERE WidgetInstId = 18608) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18609) END FROM WidgetInst WHERE WidgetInstId = 18609) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18610) END FROM WidgetInst WHERE WidgetInstId = 18610) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18611) END FROM WidgetInst WHERE WidgetInstId = 18611) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18612) END FROM WidgetInst WHERE WidgetInstId = 18612) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18676;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18690) END FROM WidgetInst WHERE WidgetInstId = 18690)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18711;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18691) END FROM WidgetInst WHERE WidgetInstId = 18691)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18712;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18692) END FROM WidgetInst WHERE WidgetInstId = 18692)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18713;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18693) END FROM WidgetInst WHERE WidgetInstId = 18693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18714;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18694) END FROM WidgetInst WHERE WidgetInstId = 18694)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18715;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18695) END FROM WidgetInst WHERE WidgetInstId = 18695)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18716;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 18696) END FROM WidgetInst WHERE WidgetInstId = 18696)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18717;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18732;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18733;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18734;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18735;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18736;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18737;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18738;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18739;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18740;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18741;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18742;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18743;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18744;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18745;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18761;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18762;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18763;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18764;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18765;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18766;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18767;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18768;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18769;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18770;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18771;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18772;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18773;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18690) END FROM WidgetInst WHERE WidgetInstId = 18690)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18774;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18691) END FROM WidgetInst WHERE WidgetInstId = 18691)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18692) END FROM WidgetInst WHERE WidgetInstId = 18692)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18693) END FROM WidgetInst WHERE WidgetInstId = 18693)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18694) END FROM WidgetInst WHERE WidgetInstId = 18694)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18695) END FROM WidgetInst WHERE WidgetInstId = 18695)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18696) END FROM WidgetInst WHERE WidgetInstId = 18696)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18795;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18796;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18797;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18798;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18799;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18800;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18801;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18802;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18816) END FROM WidgetInst WHERE WidgetInstId = 18816) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18823;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18817) END FROM WidgetInst WHERE WidgetInstId = 18817) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18818) END FROM WidgetInst WHERE WidgetInstId = 18818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18819) END FROM WidgetInst WHERE WidgetInstId = 18819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18820) END FROM WidgetInst WHERE WidgetInstId = 18820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18821) END FROM WidgetInst WHERE WidgetInstId = 18821) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18837;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18838;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18839;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18840;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18841;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18842;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18843;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18844;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18816) END FROM WidgetInst WHERE WidgetInstId = 18816) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18817) END FROM WidgetInst WHERE WidgetInstId = 18817) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18852;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18818) END FROM WidgetInst WHERE WidgetInstId = 18818) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18853;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18819) END FROM WidgetInst WHERE WidgetInstId = 18819) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18854;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18820) END FROM WidgetInst WHERE WidgetInstId = 18820) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18855;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18821) END FROM WidgetInst WHERE WidgetInstId = 18821) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18856;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 18822) END FROM WidgetInst WHERE WidgetInstId = 18822) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18857;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18865;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18866;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18867;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18868;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18869;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18870;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18871;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18704) END FROM WidgetInst WHERE WidgetInstId = 18704) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18872;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18705) END FROM WidgetInst WHERE WidgetInstId = 18705) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18873;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18706) END FROM WidgetInst WHERE WidgetInstId = 18706) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18874;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18707) END FROM WidgetInst WHERE WidgetInstId = 18707) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18875;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18708) END FROM WidgetInst WHERE WidgetInstId = 18708) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18876;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18709) END FROM WidgetInst WHERE WidgetInstId = 18709) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18877;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 18710) END FROM WidgetInst WHERE WidgetInstId = 18710) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18878;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18879;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18880;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18881;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18882;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18883;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18884;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18885;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18900;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18901;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18902;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18903;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18904;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18905;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 18906;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19131) END FROM WidgetInst WHERE WidgetInstId = 19131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19138;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19132) END FROM WidgetInst WHERE WidgetInstId = 19132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19139;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19133) END FROM WidgetInst WHERE WidgetInstId = 19133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19134) END FROM WidgetInst WHERE WidgetInstId = 19134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19135) END FROM WidgetInst WHERE WidgetInstId = 19135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19142;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19136) END FROM WidgetInst WHERE WidgetInstId = 19136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19143;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19137) END FROM WidgetInst WHERE WidgetInstId = 19137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19144;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19131) END FROM WidgetInst WHERE WidgetInstId = 19131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19132) END FROM WidgetInst WHERE WidgetInstId = 19132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19133) END FROM WidgetInst WHERE WidgetInstId = 19133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19154;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19134) END FROM WidgetInst WHERE WidgetInstId = 19134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19155;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19135) END FROM WidgetInst WHERE WidgetInstId = 19135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19156;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19136) END FROM WidgetInst WHERE WidgetInstId = 19136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19157;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19137) END FROM WidgetInst WHERE WidgetInstId = 19137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19131) END FROM WidgetInst WHERE WidgetInstId = 19131) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19166;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19132) END FROM WidgetInst WHERE WidgetInstId = 19132) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19167;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19133) END FROM WidgetInst WHERE WidgetInstId = 19133) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19134) END FROM WidgetInst WHERE WidgetInstId = 19134) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19135) END FROM WidgetInst WHERE WidgetInstId = 19135) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19170;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19136) END FROM WidgetInst WHERE WidgetInstId = 19136) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19171;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19137) END FROM WidgetInst WHERE WidgetInstId = 19137) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19172;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19180;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19181;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19243) END FROM WidgetInst WHERE WidgetInstId = 19243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19250;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19244) END FROM WidgetInst WHERE WidgetInstId = 19244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19251;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19245) END FROM WidgetInst WHERE WidgetInstId = 19245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19252;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19246) END FROM WidgetInst WHERE WidgetInstId = 19246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19253;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19247) END FROM WidgetInst WHERE WidgetInstId = 19247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19254;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19248) END FROM WidgetInst WHERE WidgetInstId = 19248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19255;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19249) END FROM WidgetInst WHERE WidgetInstId = 19249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19256;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19243) END FROM WidgetInst WHERE WidgetInstId = 19243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19264;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19244) END FROM WidgetInst WHERE WidgetInstId = 19244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19265;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19245) END FROM WidgetInst WHERE WidgetInstId = 19245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19266;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19246) END FROM WidgetInst WHERE WidgetInstId = 19246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19267;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19247) END FROM WidgetInst WHERE WidgetInstId = 19247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19268;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19248) END FROM WidgetInst WHERE WidgetInstId = 19248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19269;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19249) END FROM WidgetInst WHERE WidgetInstId = 19249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19270;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19243) END FROM WidgetInst WHERE WidgetInstId = 19243) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19278;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19244) END FROM WidgetInst WHERE WidgetInstId = 19244) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19279;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19245) END FROM WidgetInst WHERE WidgetInstId = 19245) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19280;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19246) END FROM WidgetInst WHERE WidgetInstId = 19246) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19281;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19247) END FROM WidgetInst WHERE WidgetInstId = 19247) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19282;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19248) END FROM WidgetInst WHERE WidgetInstId = 19248) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19283;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19249) END FROM WidgetInst WHERE WidgetInstId = 19249) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19284;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19292;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19293;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19296;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19297;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19383) END FROM WidgetInst WHERE WidgetInstId = 19383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19390;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19384) END FROM WidgetInst WHERE WidgetInstId = 19384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19391;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19392;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19386) END FROM WidgetInst WHERE WidgetInstId = 19386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19393;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19387) END FROM WidgetInst WHERE WidgetInstId = 19387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19394;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19388) END FROM WidgetInst WHERE WidgetInstId = 19388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19395;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19389) END FROM WidgetInst WHERE WidgetInstId = 19389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19396;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19383) END FROM WidgetInst WHERE WidgetInstId = 19383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19404;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19384) END FROM WidgetInst WHERE WidgetInstId = 19384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19405;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19386) END FROM WidgetInst WHERE WidgetInstId = 19386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19387) END FROM WidgetInst WHERE WidgetInstId = 19387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19408;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19388) END FROM WidgetInst WHERE WidgetInstId = 19388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19409;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19389) END FROM WidgetInst WHERE WidgetInstId = 19389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19383) END FROM WidgetInst WHERE WidgetInstId = 19383) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19384) END FROM WidgetInst WHERE WidgetInstId = 19384) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19385) END FROM WidgetInst WHERE WidgetInstId = 19385) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19420;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19386) END FROM WidgetInst WHERE WidgetInstId = 19386) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19421;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19387) END FROM WidgetInst WHERE WidgetInstId = 19387) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19388) END FROM WidgetInst WHERE WidgetInstId = 19388) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19389) END FROM WidgetInst WHERE WidgetInstId = 19389) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19424;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19434;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19435;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19436;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19437;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19523) END FROM WidgetInst WHERE WidgetInstId = 19523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19530;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19524) END FROM WidgetInst WHERE WidgetInstId = 19524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19531;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19532;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19526) END FROM WidgetInst WHERE WidgetInstId = 19526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19533;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19527) END FROM WidgetInst WHERE WidgetInstId = 19527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19534;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19528) END FROM WidgetInst WHERE WidgetInstId = 19528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19535;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19529) END FROM WidgetInst WHERE WidgetInstId = 19529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19536;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19523) END FROM WidgetInst WHERE WidgetInstId = 19523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19544;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19524) END FROM WidgetInst WHERE WidgetInstId = 19524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19545;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19546;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19526) END FROM WidgetInst WHERE WidgetInstId = 19526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19547;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19527) END FROM WidgetInst WHERE WidgetInstId = 19527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19548;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19528) END FROM WidgetInst WHERE WidgetInstId = 19528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19549;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19529) END FROM WidgetInst WHERE WidgetInstId = 19529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19550;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19523) END FROM WidgetInst WHERE WidgetInstId = 19523) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19558;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19524) END FROM WidgetInst WHERE WidgetInstId = 19524) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19559;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19560;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19526) END FROM WidgetInst WHERE WidgetInstId = 19526) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19561;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19527) END FROM WidgetInst WHERE WidgetInstId = 19527) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19562;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19528) END FROM WidgetInst WHERE WidgetInstId = 19528) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19563;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19529) END FROM WidgetInst WHERE WidgetInstId = 19529) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19564;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19565) END FROM WidgetInst WHERE WidgetInstId = 19565) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19523) END FROM WidgetInst WHERE WidgetInstId = 19523)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19572;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19566) END FROM WidgetInst WHERE WidgetInstId = 19566) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19524) END FROM WidgetInst WHERE WidgetInstId = 19524)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19573;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19567) END FROM WidgetInst WHERE WidgetInstId = 19567) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19574;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19568) END FROM WidgetInst WHERE WidgetInstId = 19568) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19526) END FROM WidgetInst WHERE WidgetInstId = 19526)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19575;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19569) END FROM WidgetInst WHERE WidgetInstId = 19569) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19527) END FROM WidgetInst WHERE WidgetInstId = 19527)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19576;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19570) END FROM WidgetInst WHERE WidgetInstId = 19570) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19528) END FROM WidgetInst WHERE WidgetInstId = 19528)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19577;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19571) END FROM WidgetInst WHERE WidgetInstId = 19571) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19529) END FROM WidgetInst WHERE WidgetInstId = 19529)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19578;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19565) END FROM WidgetInst WHERE WidgetInstId = 19565) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19523) END FROM WidgetInst WHERE WidgetInstId = 19523)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19586;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19566) END FROM WidgetInst WHERE WidgetInstId = 19566) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19524) END FROM WidgetInst WHERE WidgetInstId = 19524)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19587;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19567) END FROM WidgetInst WHERE WidgetInstId = 19567) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19588;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19568) END FROM WidgetInst WHERE WidgetInstId = 19568) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19526) END FROM WidgetInst WHERE WidgetInstId = 19526)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19589;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19569) END FROM WidgetInst WHERE WidgetInstId = 19569) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19527) END FROM WidgetInst WHERE WidgetInstId = 19527)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19590;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19570) END FROM WidgetInst WHERE WidgetInstId = 19570) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19528) END FROM WidgetInst WHERE WidgetInstId = 19528)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19591;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19571) END FROM WidgetInst WHERE WidgetInstId = 19571) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19529) END FROM WidgetInst WHERE WidgetInstId = 19529)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19592;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19565) END FROM WidgetInst WHERE WidgetInstId = 19565) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19523) END FROM WidgetInst WHERE WidgetInstId = 19523)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19600;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19566) END FROM WidgetInst WHERE WidgetInstId = 19566) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19524) END FROM WidgetInst WHERE WidgetInstId = 19524)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19601;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19567) END FROM WidgetInst WHERE WidgetInstId = 19567) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19525) END FROM WidgetInst WHERE WidgetInstId = 19525)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19602;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19568) END FROM WidgetInst WHERE WidgetInstId = 19568) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19526) END FROM WidgetInst WHERE WidgetInstId = 19526)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19603;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19569) END FROM WidgetInst WHERE WidgetInstId = 19569) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19527) END FROM WidgetInst WHERE WidgetInstId = 19527)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19604;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19570) END FROM WidgetInst WHERE WidgetInstId = 19570) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19528) END FROM WidgetInst WHERE WidgetInstId = 19528)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19605;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 19571) END FROM WidgetInst WHERE WidgetInstId = 19571) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 19529) END FROM WidgetInst WHERE WidgetInstId = 19529)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19606;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19614;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19615;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19616;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19617;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19618;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19619;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19620;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19628) END FROM WidgetInst WHERE WidgetInstId = 19628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19635;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19629) END FROM WidgetInst WHERE WidgetInstId = 19629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19636;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19630) END FROM WidgetInst WHERE WidgetInstId = 19630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19637;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19631) END FROM WidgetInst WHERE WidgetInstId = 19631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19638;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19632) END FROM WidgetInst WHERE WidgetInstId = 19632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19639;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19633) END FROM WidgetInst WHERE WidgetInstId = 19633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19640;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19634) END FROM WidgetInst WHERE WidgetInstId = 19634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19641;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19628) END FROM WidgetInst WHERE WidgetInstId = 19628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19656;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19629) END FROM WidgetInst WHERE WidgetInstId = 19629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19657;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19630) END FROM WidgetInst WHERE WidgetInstId = 19630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19658;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19631) END FROM WidgetInst WHERE WidgetInstId = 19631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19659;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19632) END FROM WidgetInst WHERE WidgetInstId = 19632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19660;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19633) END FROM WidgetInst WHERE WidgetInstId = 19633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19661;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19634) END FROM WidgetInst WHERE WidgetInstId = 19634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19662;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19628) END FROM WidgetInst WHERE WidgetInstId = 19628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19677;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19629) END FROM WidgetInst WHERE WidgetInstId = 19629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19678;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19630) END FROM WidgetInst WHERE WidgetInstId = 19630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19679;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19631) END FROM WidgetInst WHERE WidgetInstId = 19631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19680;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19632) END FROM WidgetInst WHERE WidgetInstId = 19632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19681;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19633) END FROM WidgetInst WHERE WidgetInstId = 19633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19682;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19634) END FROM WidgetInst WHERE WidgetInstId = 19634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19683;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19628) END FROM WidgetInst WHERE WidgetInstId = 19628) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19754;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19629) END FROM WidgetInst WHERE WidgetInstId = 19629) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19755;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19630) END FROM WidgetInst WHERE WidgetInstId = 19630) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19756;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19631) END FROM WidgetInst WHERE WidgetInstId = 19631) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19757;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19632) END FROM WidgetInst WHERE WidgetInstId = 19632) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19758;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19633) END FROM WidgetInst WHERE WidgetInstId = 19633) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19759;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19634) END FROM WidgetInst WHERE WidgetInstId = 19634) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19760;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19775;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19776;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19777;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19778;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19779;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19780;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Link' AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19781;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19796) END FROM WidgetInst WHERE WidgetInstId = 19796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19803;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19797) END FROM WidgetInst WHERE WidgetInstId = 19797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19804;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19798) END FROM WidgetInst WHERE WidgetInstId = 19798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19805;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19799) END FROM WidgetInst WHERE WidgetInstId = 19799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19806;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19800) END FROM WidgetInst WHERE WidgetInstId = 19800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19807;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19808;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 19802) END FROM WidgetInst WHERE WidgetInstId = 19802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19809;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19796) END FROM WidgetInst WHERE WidgetInstId = 19796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19824;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19797) END FROM WidgetInst WHERE WidgetInstId = 19797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19825;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19798) END FROM WidgetInst WHERE WidgetInstId = 19798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19826;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19799) END FROM WidgetInst WHERE WidgetInstId = 19799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19827;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19800) END FROM WidgetInst WHERE WidgetInstId = 19800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19828;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19829;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 19802) END FROM WidgetInst WHERE WidgetInstId = 19802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19830;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19796) END FROM WidgetInst WHERE WidgetInstId = 19796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19845;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19797) END FROM WidgetInst WHERE WidgetInstId = 19797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19846;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19798) END FROM WidgetInst WHERE WidgetInstId = 19798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19847;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19799) END FROM WidgetInst WHERE WidgetInstId = 19799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19848;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19800) END FROM WidgetInst WHERE WidgetInstId = 19800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19849;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19850;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 19802) END FROM WidgetInst WHERE WidgetInstId = 19802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19851;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19796) END FROM WidgetInst WHERE WidgetInstId = 19796) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19922;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19797) END FROM WidgetInst WHERE WidgetInstId = 19797) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19923;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19798) END FROM WidgetInst WHERE WidgetInstId = 19798) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19924;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19799) END FROM WidgetInst WHERE WidgetInstId = 19799) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19925;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19800) END FROM WidgetInst WHERE WidgetInstId = 19800) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19926;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19801) END FROM WidgetInst WHERE WidgetInstId = 19801) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19927;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating curve' AND WidgetInstId = 19802) END FROM WidgetInst WHERE WidgetInstId = 19802) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19928;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19950) END FROM WidgetInst WHERE WidgetInstId = 19950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19957;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19951) END FROM WidgetInst WHERE WidgetInstId = 19951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19958;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19952) END FROM WidgetInst WHERE WidgetInstId = 19952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19959;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19953) END FROM WidgetInst WHERE WidgetInstId = 19953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19960;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19954) END FROM WidgetInst WHERE WidgetInstId = 19954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19961;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19955) END FROM WidgetInst WHERE WidgetInstId = 19955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19962;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Specified' AND WidgetInstId = 19956) END FROM WidgetInst WHERE WidgetInstId = 19956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19963;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19950) END FROM WidgetInst WHERE WidgetInstId = 19950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19971;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19951) END FROM WidgetInst WHERE WidgetInstId = 19951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19972;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19952) END FROM WidgetInst WHERE WidgetInstId = 19952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19973;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19953) END FROM WidgetInst WHERE WidgetInstId = 19953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19974;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19954) END FROM WidgetInst WHERE WidgetInstId = 19954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19975;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19955) END FROM WidgetInst WHERE WidgetInstId = 19955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19976;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19956) END FROM WidgetInst WHERE WidgetInstId = 19956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19977;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19950) END FROM WidgetInst WHERE WidgetInstId = 19950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19985;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19951) END FROM WidgetInst WHERE WidgetInstId = 19951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19986;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19952) END FROM WidgetInst WHERE WidgetInstId = 19952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19987;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19953) END FROM WidgetInst WHERE WidgetInstId = 19953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19988;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19954) END FROM WidgetInst WHERE WidgetInstId = 19954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19989;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19955) END FROM WidgetInst WHERE WidgetInstId = 19955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19990;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19956) END FROM WidgetInst WHERE WidgetInstId = 19956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19991;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19950) END FROM WidgetInst WHERE WidgetInstId = 19950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 19999;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19951) END FROM WidgetInst WHERE WidgetInstId = 19951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20000;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19952) END FROM WidgetInst WHERE WidgetInstId = 19952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20001;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19953) END FROM WidgetInst WHERE WidgetInstId = 19953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20002;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19954) END FROM WidgetInst WHERE WidgetInstId = 19954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20003;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19955) END FROM WidgetInst WHERE WidgetInstId = 19955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20004;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19956) END FROM WidgetInst WHERE WidgetInstId = 19956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20005;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19950) END FROM WidgetInst WHERE WidgetInstId = 19950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20013;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19951) END FROM WidgetInst WHERE WidgetInstId = 19951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20014;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19952) END FROM WidgetInst WHERE WidgetInstId = 19952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20015;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19953) END FROM WidgetInst WHERE WidgetInstId = 19953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20016;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19954) END FROM WidgetInst WHERE WidgetInstId = 19954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20017;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19955) END FROM WidgetInst WHERE WidgetInstId = 19955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20018;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19956) END FROM WidgetInst WHERE WidgetInstId = 19956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20019;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19950) END FROM WidgetInst WHERE WidgetInstId = 19950) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20027;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19951) END FROM WidgetInst WHERE WidgetInstId = 19951) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20028;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19952) END FROM WidgetInst WHERE WidgetInstId = 19952) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20029;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19953) END FROM WidgetInst WHERE WidgetInstId = 19953) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20030;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19954) END FROM WidgetInst WHERE WidgetInstId = 19954) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20031;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19955) END FROM WidgetInst WHERE WidgetInstId = 19955) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20032;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Computed' AND WidgetInstId = 19956) END FROM WidgetInst WHERE WidgetInstId = 19956) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20033;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18403) END FROM WidgetInst WHERE WidgetInstId = 18403) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20041;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18404) END FROM WidgetInst WHERE WidgetInstId = 18404) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20042;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18405) END FROM WidgetInst WHERE WidgetInstId = 18405) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20043;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18406) END FROM WidgetInst WHERE WidgetInstId = 18406) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20044;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18407) END FROM WidgetInst WHERE WidgetInstId = 18407) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20045;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18408) END FROM WidgetInst WHERE WidgetInstId = 18408) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20046;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 18409) END FROM WidgetInst WHERE WidgetInstId = 18409) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Mobile' AND WidgetInstId = 18008) END FROM WidgetInst WHERE WidgetInstId = 18008)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20047;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20055) END FROM WidgetInst WHERE WidgetInstId = 20055) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20062;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20056) END FROM WidgetInst WHERE WidgetInstId = 20056) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20063;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20057) END FROM WidgetInst WHERE WidgetInstId = 20057) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20064;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20058) END FROM WidgetInst WHERE WidgetInstId = 20058) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20065;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20059) END FROM WidgetInst WHERE WidgetInstId = 20059) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20066;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20060) END FROM WidgetInst WHERE WidgetInstId = 20060) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20067;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'File' AND WidgetInstId = 20061) END FROM WidgetInst WHERE WidgetInstId = 20061) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20068;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20080;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20080;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20080;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20080;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20080;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20080;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 264 AND WidgetInstId = 20081;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 265 AND WidgetInstId = 20081;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 266 AND WidgetInstId = 20081;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 267 AND WidgetInstId = 20081;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 268 AND WidgetInstId = 20081;


Query:
UPDATE ComboOptionInst SET Enabled = CASE WHEN (SELECT CASE WHEN (SELECT COUNT(*) FROM Sets WHERE SetEntityId = ?)= 2 THEN 1 ELSE 0 END) = 1 THEN 1 ELSE 0 END WHERE CbxOptionId = 269 AND WidgetInstId = 20081;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20082;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Wall (No-slip boundary)' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20083;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20086) END FROM WidgetInst WHERE WidgetInstId = 20086) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20088;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'On' AND WidgetInstId = 20087) END FROM WidgetInst WHERE WidgetInstId = 20087) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20089;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20092;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert HY-8' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20093;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20104;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value != '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20105;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20110;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = '(none selected)' AND WidgetInstId = 18005) END FROM WidgetInst WHERE WidgetInstId = 18005) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20111;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20116;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Exit-Q (known-Q outflow)') AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20117;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20120) END FROM WidgetInst WHERE WidgetInstId = 20120) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20122;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20121) END FROM WidgetInst WHERE WidgetInstId = 20121) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20123;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20120) END FROM WidgetInst WHERE WidgetInstId = 20120) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20128;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20121) END FROM WidgetInst WHERE WidgetInstId = 20121) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20129;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20134;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Exit-H (subcritical outflow)' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20135;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20138) END FROM WidgetInst WHERE WidgetInstId = 20138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20140;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20139) END FROM WidgetInst WHERE WidgetInstId = 20139) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20141;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20138) END FROM WidgetInst WHERE WidgetInstId = 20138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20146;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20139) END FROM WidgetInst WHERE WidgetInstId = 20139) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20147;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20138) END FROM WidgetInst WHERE WidgetInstId = 20138) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20152;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20139) END FROM WidgetInst WHERE WidgetInstId = 20139) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20153;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20158;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20159;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20162) END FROM WidgetInst WHERE WidgetInstId = 20162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20168;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20163) END FROM WidgetInst WHERE WidgetInstId = 20163)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20169;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20174;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20175;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20176;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20177;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20182;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20183;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20184;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20185;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20162) END FROM WidgetInst WHERE WidgetInstId = 20162)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20186;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Inlet-SC (supercritical inflow)' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20163) END FROM WidgetInst WHERE WidgetInstId = 20163)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20187;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20192;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20193;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20194;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20195;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20198) END FROM WidgetInst WHERE WidgetInstId = 20198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20200;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20199) END FROM WidgetInst WHERE WidgetInstId = 20199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20201;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20204;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20205;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20206;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20207;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20198) END FROM WidgetInst WHERE WidgetInstId = 20198) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20208;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Rating Curve' AND WidgetInstId = 20199) END FROM WidgetInst WHERE WidgetInstId = 20199) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20209;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20212;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'U.S. Customary' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20213;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20166) END FROM WidgetInst WHERE WidgetInstId = 20166) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20214;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Metric' AND WidgetInstId = 20167) END FROM WidgetInst WHERE WidgetInstId = 20167) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20215;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20216;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value IN ('Inlet-Q (subcritical inflow)','Inlet-SC (supercritical inflow)') AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20217;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20222;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Culvert' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20223;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20288) END FROM WidgetInst WHERE WidgetInstId = 20288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20290;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20289) END FROM WidgetInst WHERE WidgetInstId = 20289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20291;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20288) END FROM WidgetInst WHERE WidgetInstId = 20288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20294;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20289) END FROM WidgetInst WHERE WidgetInstId = 20289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20295;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20288) END FROM WidgetInst WHERE WidgetInstId = 20288) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20298;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20289) END FROM WidgetInst WHERE WidgetInstId = 20289) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20299;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20302;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20303;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20320) END FROM WidgetInst WHERE WidgetInstId = 20320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20322;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20321) END FROM WidgetInst WHERE WidgetInstId = 20321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20323;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20320) END FROM WidgetInst WHERE WidgetInstId = 20320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20326;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20321) END FROM WidgetInst WHERE WidgetInstId = 20321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20327;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20320) END FROM WidgetInst WHERE WidgetInstId = 20320) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20330;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20321) END FROM WidgetInst WHERE WidgetInstId = 20321) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20331;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20334;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Gate' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20335;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20360) END FROM WidgetInst WHERE WidgetInstId = 20360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20362;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20361) END FROM WidgetInst WHERE WidgetInstId = 20361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20363;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20360) END FROM WidgetInst WHERE WidgetInstId = 20360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20366;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20361) END FROM WidgetInst WHERE WidgetInstId = 20361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20367;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20360) END FROM WidgetInst WHERE WidgetInstId = 20360) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20370;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20361) END FROM WidgetInst WHERE WidgetInstId = 20361) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20371;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20374;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Pressure' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20375;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20400) END FROM WidgetInst WHERE WidgetInstId = 20400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20402;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20401) END FROM WidgetInst WHERE WidgetInstId = 20401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20403;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20400) END FROM WidgetInst WHERE WidgetInstId = 20400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20406;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20401) END FROM WidgetInst WHERE WidgetInstId = 20401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20407;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20400) END FROM WidgetInst WHERE WidgetInstId = 20400) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20410;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20401) END FROM WidgetInst WHERE WidgetInstId = 20401) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20411;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20412) END FROM WidgetInst WHERE WidgetInstId = 20412) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20400) END FROM WidgetInst WHERE WidgetInstId = 20400)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20414;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20413) END FROM WidgetInst WHERE WidgetInstId = 20413) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20401) END FROM WidgetInst WHERE WidgetInstId = 20401)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20415;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20412) END FROM WidgetInst WHERE WidgetInstId = 20412) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20400) END FROM WidgetInst WHERE WidgetInstId = 20400)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20418;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20413) END FROM WidgetInst WHERE WidgetInstId = 20413) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20401) END FROM WidgetInst WHERE WidgetInstId = 20401)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20419;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20412) END FROM WidgetInst WHERE WidgetInstId = 20412) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20400) END FROM WidgetInst WHERE WidgetInstId = 20400)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20422;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT C FROM AndOperator WHERE A = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'user' AND WidgetInstId = 20413) END FROM WidgetInst WHERE WidgetInstId = 20413) AND B = (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM IntValues WHERE Value = 1 AND WidgetInstId = 20401) END FROM WidgetInst WHERE WidgetInstId = 20401)) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20423;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20080) END FROM WidgetInst WHERE WidgetInstId = 20080) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20426;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Internal sink' AND WidgetInstId = 20081) END FROM WidgetInst WHERE WidgetInstId = 20081) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20427;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20430) END FROM WidgetInst WHERE WidgetInstId = 20430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20432;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Constant' AND WidgetInstId = 20431) END FROM WidgetInst WHERE WidgetInstId = 20431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20433;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20430) END FROM WidgetInst WHERE WidgetInstId = 20430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20438;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Time Series' AND WidgetInstId = 20431) END FROM WidgetInst WHERE WidgetInstId = 20431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20439;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20430) END FROM WidgetInst WHERE WidgetInstId = 20430) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20444;


Query:
UPDATE WidgetInst SET Enabled = CASE WHEN (SELECT CASE WHEN Enabled = 0 OR Enabled = 2 THEN -1 ELSE (SELECT COUNT(*) FROM TextValues WHERE Value = 'Weir' AND WidgetInstId = 20431) END FROM WidgetInst WHERE WidgetInstId = 20431) = 1 THEN 1 ELSE 0 END WHERE WidgetInstId = 20445;


